(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[      3951,        116]
NotebookOptionsPosition[      3553,         97]
NotebookOutlinePosition[      3900,        112]
CellTagsIndexPosition[      3857,        109]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
 RowBox[{"For", "[", 
  RowBox[{
   RowBox[{"x", "=", "1000"}], ",", " ", 
   RowBox[{"x", " ", "\[LessEqual]", " ", "3339"}], ",", " ", 
   RowBox[{"x", "++"}], ",", "\[IndentingNewLine]", "\t", 
   RowBox[{
    RowBox[{"y", " ", "=", "  ", 
     RowBox[{"x", " ", "+", " ", "3330"}]}], ";", "\[IndentingNewLine]", "\t", 
    RowBox[{"z", "=", " ", 
     RowBox[{"y", " ", "+", " ", "3330"}]}], ";", "\[IndentingNewLine]", "\t", 
    RowBox[{"lx", " ", "=", "  ", 
     RowBox[{"IntegerDigits", "[", "x", "]"}]}], ";", "\t", 
    "\[IndentingNewLine]", "\t", 
    RowBox[{"ly", " ", "=", " ", 
     RowBox[{"IntegerDigits", "[", "y", "]"}]}], ";", "\[IndentingNewLine]", 
    "\t", 
    RowBox[{"lz", " ", "=", " ", 
     RowBox[{"IntegerDigits", "[", "z", "]"}]}], ";", "\[IndentingNewLine]", 
    "\t", 
    RowBox[{"plx", " ", "=", " ", 
     RowBox[{"Permutations", "[", "lx", "]"}]}], ";", "\[IndentingNewLine]", 
    "\t", 
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"x", " ", "\[Element]", " ", "Primes"}], ")"}], " ", "&&", 
       " ", 
       RowBox[{"(", 
        RowBox[{"MemberQ", "[", 
         RowBox[{"plx", ",", " ", "ly"}], "]"}], ")"}], "  ", "&&", " ", 
       RowBox[{"(", 
        RowBox[{"y", " ", "\[Element]", " ", "Primes"}], ")"}], " ", "&&", 
       " ", 
       RowBox[{"(", 
        RowBox[{"MemberQ", "[", 
         RowBox[{"plx", ",", " ", "lz"}], "]"}], ")"}], " ", "&&", " ", 
       RowBox[{"(", 
        RowBox[{"z", " ", "\[Element]", " ", "Primes"}], ")"}]}], ",", " ", 
      RowBox[{"Print", "[", 
       RowBox[{
       "x", ",", " ", "\"\< \>\"", ",", " ", "y", ",", " ", "\"\< \>\"", ",", 
        " ", "z"}], "]"}]}], "]"}], ";"}]}], "\t\t", "\[IndentingNewLine]", 
  "]"}]], "Input",
 CellChangeTimes->{{3.447692907459525*^9, 3.447693064537525*^9}, 
   3.4476931619565253`*^9, {3.4476932745735254`*^9, 3.4476932889895253`*^9}, {
   3.4476933595935254`*^9, 3.4476934273335257`*^9}, 3.447693573997525*^9, {
   3.4476936294505253`*^9, 3.4476936344415255`*^9}, {3.4476936759915257`*^9, 
   3.447693818032525*^9}, {3.4476938486715255`*^9, 3.4476938990685253`*^9}, {
   3.4476939306825256`*^9, 3.4476939395945253`*^9}, {3.4476941966685257`*^9, 
   3.4476942897665253`*^9}, {3.4476945227785254`*^9, 3.4476945508405256`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{
  "1487", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4817", 
   "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "8147"}],
  SequenceForm[1487, " ", 4817, " ", 8147],
  Editable->False]], "Print",
 CellChangeTimes->{3.4476945515085254`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{
  "2969", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "6299", 
   "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "9629"}],
  SequenceForm[2969, " ", 6299, " ", 9629],
  Editable->False]], "Print",
 CellChangeTimes->{3.447694551544525*^9}]
}, Open  ]]
}, Open  ]]
},
WindowSize->{1162, 750},
WindowMargins->{{Automatic, 244}, {83, Automatic}},
FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (November 10, 2008)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 2324, 51, 192, "Input"],
Cell[CellGroupData[{
Cell[2916, 77, 304, 7, 23, "Print"],
Cell[3223, 86, 302, 7, 23, "Print"]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
